package com.jemframework.domain.propertyconverter;

public class StringPropertyConverter {

  public Object getAsObject(String aString) {

    if (aString == null || aString.trim().length() == 0) {
      return null;
    }

    return aString;
  }

  public String getAsString(Object aProperty) {

    if (aProperty == null) {
      return "";
    }

    String theProperty = (String) aProperty;
    return theProperty.toString();
  }
}
